/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.data.index.database;

public class Link {
	private Integer grid_id;
	private Integer geom_id;
	public Integer getGrid_id() {
		return grid_id;
	}
	public void setGrid_id(Integer gridId) {
		grid_id = gridId;
	}
	public Integer getGeom_id() {
		return geom_id;
	}
	public void setGeom_id(Integer geomId) {
		geom_id = geomId;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((geom_id == null) ? 0 : geom_id.hashCode());
		result = prime * result + ((grid_id == null) ? 0 : grid_id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Link other = (Link) obj;
		if (geom_id == null) {
			if (other.geom_id != null)
				return false;
		} else if (!geom_id.equals(other.geom_id))
			return false;
		if (grid_id == null) {
			if (other.grid_id != null)
				return false;
		} else if (!grid_id.equals(other.grid_id))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "Index [geom_id=" + geom_id + ", grid_id=" + grid_id + "]";
	}
}